Video coding and decoding

ABSTRACT

A method of encoding a motion vector predictor index, in particular a Merge index, comprises generating a list of motion vector predictor candidates, in particular merge candidates. The list includes an ATMVP candidate. One of the motion vector predictor candidates in the list is selected. A motion vector predictor index for the selected motion vector predictor candidate is generated using CABAC coding. One or more bits of the motion vector predictor index are bypass CABAC coded. For example, only the first bit of the motion vector predictor index is CABAC coded using a single context.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is the National Phase application of PCT ApplicationNo. PCT/EP2019/075224, filed on Sep. 19, 2019 and titled “VIDEO CODINGAND DECODING”. This application claims the benefit under 35 U.S.C. §119(a)-(d) of United Kingdom Patent Application No. 1815443.5, filed onSep. 21, 2018 and United Kingdom Patent Application No. 1815564.8, filedon Sep. 24, 2018. The above cited patent applications are incorporatedherein by reference in their entirety.

FIELD OF INVENTION

The present invention relates to video coding and decoding.

BACKGROUND

Recently, the Joint Video Experts Team (JVET), a collaborative teamformed by MPEG and ITU-T Study Group 16's VCEG, commenced work on a newvideo coding standard referred to as Versatile Video Coding (VVC). Thegoal of VVC is to provide significant improvements in compressionperformance over the existing HEVC standard (i.e., typically twice asmuch as before) and to be completed in 2020. The main targetapplications and services include—but not limited to—360-degree andhigh-dynamic-range (HDR) videos. In total, JVET evaluated responses from32 organizations using formal subjective tests conducted by independenttest labs. Some proposals demonstrated compression efficiency gains oftypically 40% or more when compared to using HEVC. Particulareffectiveness was shown on ultra-high definition (UHD) video testmaterial. Thus, we may expect compression efficiency gains well-beyondthe targeted 50% for the final standard.

The JVET exploration model (JEM) uses all the HEVC tools. A further toolnot present in HEVC is to use an ‘affine motion mode’ when applyingmotion compensation. Motion compensation in HEVC is limited totranslations, but in reality there are many kinds of motion, e.g. zoomin/out, rotation, perspective motions and other irregular motions. Whenutilising affine motion mode, a more complex transform is applied to ablock to attempt to more accurately predict such forms of motion.

Another tool not present in HEVC is to use Alternative Temporal MotionVector Prediction (ATMVP). The alternative temporal motion vectorprediction (ATMVP) is a particular motion compensation. Instead ofconsidering only one motion information for the current block from atemporal reference frame, each motion information of each collocatedblock is considered. So this temporal motion vector prediction gives asegmentation of the current block with the related motion information ofeach sub-block. In the current VTM reference software, ATMVP issignalled as a merge candidate inserted in the list of Merge candidates.When ATMVP is enabled at SPS level, the maximum number of Mergecandidates is increased by one. So 6 candidates are considered insteadof 5 when this mode is disabled.

These, and other tools described later, are bringing up problemsrelating to the coding efficiency and complexity of the coding of aMerge index used to signal which Merge candidate is selected from amongthe list of Merge candidates.

Accordingly, a solution to at least one of the aforementioned problemsis desirable.

According to a first aspect of the present invention there is provided amethod of encoding a motion vector predictor index, comprising:

generating a list of motion vector predictor candidates including anATMVP candidate;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index (Merge index) for theselected motion vector predictor candidate using CABAC coding, one ormore bits of the motion vector predictor index being bypass CABAC coded.

In one embodiment, all bits except for a first bit of the motion vectorpredictor index are bypass CABAC coded.

According to a second aspect of the present invention there is provideda method of decoding a motion vector predictor index, comprising:

generating a list of motion vector predictor candidates including anATMVP candidate;

decoding the motion vector predictor index using CABAC decoding, one ormore bits of the motion vector predictor index being bypass CABACdecoded; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

In one embodiment, all bits except for a first bit of the motion vectorpredictor index are bypass CABAC decoded.

According to a third aspect of the present invention there is provided adevice for encoding a motion vector predictor index, comprising:

means for generating a list of motion vector predictor candidatesincluding an ATMVP candidate;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index (Merge index) forthe selected motion vector predictor candidate using CABAC coding, oneor more bits of the motion vector predictor index being bypass CABACcoded.

According to a fourth aspect of the present invention there is provideda device for decoding a motion vector predictor index, comprising:

means for generating a list of motion vector predictor candidatesincluding an ATMVP candidate;

means for decoding the motion vector predictor index using CABACdecoding, one or more bits of the motion vector predictor index beingbypass CABAC decoded; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a fifth aspect of the present invention there is provided amethod of encoding a motion vector predictor index, comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, two or more bits of themotion vector predictor index sharing the same context.

In one embodiment, all bits of the motion vector predictor index sharethe same context.

According to a sixth aspect of the present invention there is provided amethod of decoding a motion vector predictor index, comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding, two ormore bits of the motion vector predictor index sharing the same context;and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

In one embodiment, all bits of the motion vector predictor index sharethe same context.

According to a seventh aspect of the present invention there is provideda device for encoding a motion vector predictor index, comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, two or more bitsof the motion vector predictor index sharing the same context.

According to an eighth aspect of the present invention there is provideda device for decoding a motion vector predictor index, comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding, two or more bits of the motion vector predictor index sharingthe same context; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a ninth aspect of the present invention there is provided amethod of encoding a motion vector predictor index, comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on a motion vector predictor index of at least oneblock neighbouring the current block.

In one embodiment the context variable for at least one bit of themotion vector predictor index depends on the respective motion vectorpredictor indexes of at least two neighbouring blocks.

In another embodiment the context variable for at least one bit of themotion vector predictor index depends on a motion vector predictor indexof a left neighbouring block on the left of the current block and on amotion vector predictor index of an upper neighbouring block above thecurrent block.

In another embodiment the left neighbouring block is A2 and the upperneighbouring block is B3.

In another embodiment the left neighbouring block is A1 and the upperneighbouring block is B1.

In another embodiment the context variable has 3 different possiblevalues.

Another embodiment comprises comparing the motion vector predictor indexof at least one neighbouring block with an index value of the motionvector predictor index of the current block and setting said contextvariable in dependence upon the comparison result.

Another embodiment comprises comparing the motion vector predictor indexof at least one neighbouring block with a parameter representing a bitposition of the or one said bit in the motion vector predictor index ofthe current block and setting said context variable in dependence uponthe comparison result.

Yet another embodiment comprises: making a first comparison, comparingthe motion vector predictor index of a first neighbouring block with aparameter representing a bit position of the or one said bit in themotion vector predictor index of the current block; making a secondcomparison, comparing the motion vector predictor index of a secondneighbouring block with said parameter; and setting said contextvariable in dependence upon the results of the first and secondcomparisons.

According to a tenth aspect of the present invention there is provided amethod of decoding a motion vector predictor index, comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding, whereina context variable for at least one bit of the motion vector predictorindex of a current block depends on a motion vector predictor index ofat least one block neighbouring the current block; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

In one embodiment the context variable for at least one bit of themotion vector predictor index depends on the respective motion vectorpredictor indexes of at least two neighbouring blocks.

In another embodiment the context variable for at least one bit of themotion vector predictor index depends on a motion vector predictor indexof a left neighbouring block on the left of the current block and on amotion vector predictor index of an upper neighbouring block above thecurrent block.

In another embodiment the left neighbouring block is A2 and the upperneighbouring block is B3.

In another embodiment the left neighbouring block is A1 and the upperneighbouring block is B1.

In another embodiment the context variable has 3 different possiblevalues.

Another embodiment comprises comparing the motion vector predictor indexof at least one neighbouring block with an index value of the motionvector predictor index of the current block and setting said contextvariable in dependence upon the comparison result.

Another embodiment comprises comparing the motion vector predictor indexof at least one neighbouring block with a parameter representing a bitposition of the or one said bit in the motion vector predictor index ofthe current block and setting said context variable in dependence uponthe comparison result.

Yet another embodiment comprises: making a first comparison, comparingthe motion vector predictor index of a first neighbouring block with aparameter representing a bit position of the or one said bit in themotion vector predictor index of the current block; making a secondcomparison, comparing the motion vector predictor index of a secondneighbouring block with said parameter; and setting said contextvariable in dependence upon the results of the first and secondcomparisons.

According to an eleventh aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on a motion vector predictor index of at least oneblock neighbouring the current block.

According to a twelfth aspect of the present invention there is provideda device for decoding a motion vector predictor index, comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding, wherein a context variable for at least one bit of the motionvector predictor index of a current block depends on a motion vectorpredictor index of at least one block neighbouring the current block;and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a thirteenth aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on a Skip flag of said current block.

According to a fourteenth aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on another parameter or syntax element of saidcurrent block that is available prior to decoding of the motion vectorpredictor index.

According to a fifteenth aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on another parameter or syntax element of saidcurrent block that is an indicator of a complexity of motion in thecurrent block.

According to a sixteenth aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding, whereina context variable for at least one bit of the motion vector predictorindex of a current block depends on a Skip flag of said current block;and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

According to a seventeenth aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding, whereina context variable for at least one bit of the motion vector predictorindex of a current block depends on another parameter or syntax elementof said current block that is available prior to decoding of the motionvector predictor index; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

According to an eighteenth aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding, whereina context variable for at least one bit of the motion vector predictorindex of a current block depends on another parameter or syntax elementof said current block that is an indicator of a complexity of motion inthe current block; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

According to a nineteenth aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on a Skip flag of said current block.

According to a twentieth aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on another parameter or syntax element of saidcurrent block that is available prior to decoding of the motion vectorpredictor index.

According to a twenty-first aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on another parameter or syntax element of saidcurrent block that is an indicator of a complexity of motion in thecurrent block.

According to a twenty-second aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding, wherein a context variable for at least one bit of the motionvector predictor index of a current block depends on a Skip flag of saidcurrent block; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a twenty-third aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding, wherein a context variable for at least one bit of the motionvector predictor index of a current block depends on another parameteror syntax element of said current block that is available prior todecoding of the motion vector predictor index; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a twenty-fourth aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding, wherein a context variable for at least one bit of the motionvector predictor index of a current block depends on another parameteror syntax element of said current block that is an indicator of acomplexity of motion in the current block; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a twenty-fifth aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on Affine Motion vector predictor candidates, ifany, in the list.

In one embodiment the context variable depends on position in said listof a first Affine Motion vector predictor candidate.

According to a twenty-sixth aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding whereina context variable for at least one bit of the motion vector predictorindex of a current block depends on Affine Motion vector predictorcandidates, if any, in the list; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

In one embodiment the context variable depends on position in said listof a first Affine Motion vector predictor candidate.

According to a twenty-seventh aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on Affine Motion vector predictor candidates, ifany, in the list.

According to a twenty-eighth aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding wherein a context variable for at least one bit of the motionvector predictor index of a current block depends on Affine Motionvector predictor candidates, if any, in the list; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a twenty-ninth aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates including anAffine Motion vector predictor candidate;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on an affine flag of the current block and/or ofat least one block neighbouring the current block.

According to a thirtieth aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates including anAffine Motion vector predictor candidate;

decoding the motion vector predictor index using CABAC decoding, whereina context variable for at least one bit of the motion vector predictorindex of a current block depends on an affine flag of the current blockand/or of at least one block neighbouring the current block; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

According to a thirty-first aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidatesincluding an Affine Motion vector predictor candidate;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block depends on an affine flag of the current block and/or ofat least one block neighbouring the current block.

According to a thirty-second aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidatesincluding an Affine Motion vector predictor candidate;

means for decoding the motion vector predictor index using CABACdecoding, wherein a context variable for at least one bit of the motionvector predictor index of a current block depends on an affine flag ofthe current block and/or of at least one block neighbouring the currentblock; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a thirty-third aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block is derived from a context variable of at least one of aSkip flag and an affine flag of the current block.

According to a thirty-fourth aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding, whereina context variable for at least one bit of the motion vector predictorindex of a current block is derived from a context variable of at leastone of a Skip flag and an affine flag of the current block; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

According to a thirty-fifth aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block is derived from a context variable of at least one of aSkip flag and an affine flag of the current block.

According to a thirty-sixth aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding, wherein a context variable for at least one bit of the motionvector predictor index of a current block is derived from a contextvariable of at least one of a Skip flag and an affine flag of thecurrent block; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a thirty-seventh aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block has only two different possible values.

According to a thirty-eighth aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding, whereina context variable for at least one bit of the motion vector predictorindex of a current block has only two different possible values; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

According to a thirty-ninth aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein a contextvariable for at least one bit of the motion vector predictor index of acurrent block has only two different possible values.

According to a fortieth aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding, wherein a context variable for at least one bit of the motionvector predictor index of a current block has only two differentpossible values; and means for using the decoded motion vector predictorindex to identify one of the motion vector predictor candidates in thelist.

According to a forty-first aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein the motion vectorpredictor index of a current block depends on Affine Motion vectorpredictor candidates, if any, in the list.

In one embodiment the motion vector predictor index is a merge index.

According to a forty-second aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates;

decoding the motion vector predictor index using CABAC decoding, whereinthe motion vector predictor index of a current block depends on AffineMotion vector predictor candidates, if any, in the list; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

In one embodiment the motion vector predictor index is a merge index.

According to a forty-third aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein the motionvector predictor index of a current block depends on Affine Motionvector predictor candidates, if any, in the list.

According to a forty-fourth aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidates;

means for decoding the motion vector predictor index using CABACdecoding, wherein the motion vector predictor index of a current blockdepends on Affine Motion vector predictor candidates, if any, in thelist; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

According to a forty-fifth aspect of the present invention there isprovided a method of encoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates including anAffine Motion vector predictor candidate;

selecting one of the motion vector predictor candidates in the list; and

generating a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, wherein the motion vectorpredictor index of a current block depends on an affine flag of thecurrent block and/or of at least one block neighbouring the currentblock.

In one embodiment the motion vector predictor index is a merge index.

According to a forty-sixth aspect of the present invention there isprovided a method of decoding a motion vector predictor index,comprising:

generating a list of motion vector predictor candidates including anAffine Motion vector predictor candidate;

decoding the motion vector predictor index using CABAC decoding, whereinthe motion vector predictor index of a current block depends on anaffine flag of the current block and/or of at least one blockneighbouring the current block; and

using the decoded motion vector predictor index to identify one of themotion vector predictor candidates in the list.

In one embodiment the motion vector predictor index is a merge index.

According to a forty-seventh aspect of the present invention there isprovided a device for encoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidatesincluding an Affine Motion vector predictor candidate;

means for selecting one of the motion vector predictor candidates in thelist; and

means for generating a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, wherein the motionvector predictor index of a current block depends on an affine flag ofthe current block and/or of at least one block neighbouring the currentblock.

According to a forty-eighth aspect of the present invention there isprovided a device for decoding a motion vector predictor index,comprising:

means for generating a list of motion vector predictor candidatesincluding an Affine Motion vector predictor candidate;

means for decoding the motion vector predictor index using CABACdecoding, wherein the motion vector predictor index of a current blockdepends on an affine flag of the current block and/or of at least oneblock neighbouring the current block; and

means for using the decoded motion vector predictor index to identifyone of the motion vector predictor candidates in the list.

Yet further aspects of the present invention relate to programs whichwhen executed by a computer or processor cause the computer or processorto carry out any of the methods of the aforementioned aspects. Theprogram may be provided on its own or may be carried on, by or in acarrier medium. The carrier medium may be non-transitory, for example astorage medium, in particular a computer-readable storage medium. Thecarrier medium may also be transitory, for example a signal or othertransmission medium. The signal may be transmitted via any suitablenetwork, including the Internet.

Yet further aspects of the present in invention relate to a cameracomprising a device according to any of the aforementioned deviceaspects. In one embodiment the camera further comprises zooming means.

In one embodiment the camera is adapted to indicate when said zoomingmeans is operational and signal affine mode in dependence on saidindication that the zooming means is operational.

In another embodiment the camera further comprises panning means.

In another embodiment the camera is adapted to indicate when saidpanning means is operational and signal affine mode in dependence onsaid indication that the panning means is operational.

According to yet another aspect of the present invention there isprovided a mobile device comprising a camera embodying any of the cameraaspects above.

In one embodiment the mobile device further comprises at least onepositional sensor adapted to sense a change in orientation of the mobiledevice.

In one embodiment the mobile device is adapted to signal affine mode independence on said sensing a change in orientation of the mobile device.

Further features of the invention are characterised by the otherindependent and dependent claims

Any feature in one aspect of the invention may be applied to otheraspects of the invention, in any appropriate combination. In particular,method aspects may be applied to apparatus aspects, and vice versa.

Furthermore, features implemented in hardware may be implemented insoftware, and vice versa. Any reference to software and hardwarefeatures herein should be construed accordingly

Any apparatus feature as described herein may also be provided as amethod feature, and vice versa. As used herein, means plus functionfeatures may be expressed alternatively in terms of their correspondingstructure, such as a suitably programmed processor and associatedmemory.

It should also be appreciated that particular combinations of thevarious features described and defined in any aspects of the inventioncan be implemented and/or supplied and/or used independently.

Reference will now be made, by way of example, to the accompanyingdrawings, in which:

FIG. 1 is a diagram for use in explaining a coding structure used inHEVC;

FIG. 2 is a block diagram schematically illustrating a datacommunication system in which one or more embodiments of the inventionmay be implemented;

FIG. 3 is a block diagram illustrating components of a processing devicein which one or more embodiments of the invention may be implemented;

FIG. 4 is a flow chart illustrating steps of an encoding methodaccording to embodiments of the invention;

FIG. 5 is a flow chart illustrating steps of a decoding method accordingto embodiments of the invention;

FIGS. 6(a) and 6(b) illustrates spatial and temporal blocks that can beused to generate motion vector predictors;

FIG. 7 shows simplified steps of the process of an AMVP predictor setderivation;

FIG. 8 is a schematic of a motion vector derivation process of the Mergemodes;

FIG. 9 illustrates segmentation of a current block and temporal motionvector prediction;

FIG. 10(a) illustrates the coding of the Merge index for HEVC, or whenATMVP is not enabled at SPS level;

FIG. 10(b) illustrates the coding of the Merge index when ATMVP isenabled at SPS level;

FIG. 11(a) illustrates a simple affine motion field;

FIG. 11(b) illustrates a more complex affine motion field;

FIG. 12 is a flow chart of the partial decoding process of some syntaxelements related to the coding mode;

FIG. 13 is a flow chart illustrating Merge candidates derivation;

FIG. 14 is a flow chart illustrating a first embodiment of theinvention;

FIG. 15 is a flow chart of the partial decoding process of some syntaxelements related to the coding mode in a twelfth embodiment of theinvention;

FIG. 16 is a flow chart illustrating generating a list of mergecandidates in the twelfth embodiment of the invention;

FIG. 17 is a block diagram for use in explaining a CABAC encodersuitable for use in embodiments of the invention;

FIG. 18 is a schematic block diagram of a computing device forimplementation of one or more embodiments of the invention;

FIG. 19 is a schematic block diagram of a computing device;

FIG. 20 is a diagram illustrating a network camera system; and

FIG. 21 is a diagram illustrating a smart phone.

DETAILED DESCRIPTION

Embodiments of the present invention described below relate to improvingencoding and decoding of indexes using CABAC. Before describing theembodiments, video encoding and decoding techniques and related encodersand decoders will be described.

FIG. 1 relates to a coding structure used in the High Efficiency VideoCoding (HEVC) video standard. A video sequence 1 is made up of asuccession of digital images i. Each such digital image is representedby one or more matrices. The matrix coefficients represent pixels.

An image 2 of the sequence may be divided into slices 3. A slice may insome instances constitute an entire image. These slices are divided intonon-overlapping Coding Tree Units (CTUs). A Coding Tree Unit (CTU) isthe basic processing unit of the High Efficiency Video Coding (HEVC)video standard and conceptually corresponds in structure to macroblockunits that were used in several previous video standards. A CTU is alsosometimes referred to as a Largest Coding Unit (LCU). A CTU has luma andchroma component parts, each of which component parts is called a CodingTree Block (CTB). These different color components are not shown in FIG.1 .

A CTU is generally of size 64 pixels×64 pixels for HEVC, yet for VVCthis size can be 128 pixels×128 pixels. Each CTU may in turn beiteratively divided into smaller variable-size Coding Units (CUs) 5using a quadtree decomposition.

Coding units are the elementary coding elements and are constituted bytwo kinds of sub-unit called a Prediction Unit (PU) and a Transform Unit(TU). The maximum size of a PU or TU is equal to the CU size. APrediction Unit corresponds to the partition of the CU for prediction ofpixels values. Various different partitions of a CU into PUs arepossible as shown by 606 including a partition into 4 square PUs and twodifferent partitions into 2 rectangular PUs. A Transform Unit is anelementary unit that is subjected to spatial transformation using DCT. ACU can be partitioned into TUs based on a quadtree representation 607.

Each slice is embedded in one Network Abstraction Layer (NAL) unit. Inaddition, the coding parameters of the video sequence are stored indedicated NAL units called parameter sets. In HEVC and H.264/AVC twokinds of parameter sets NAL units are employed: first, a SequenceParameter Set (SPS) NAL unit that gathers all parameters that areunchanged during the whole video sequence. Typically, it handles thecoding profile, the size of the video frames and other parameters.Secondly, a Picture Parameter Set (PPS) NAL unit includes parametersthat may change from one image (or frame) to another of a sequence. HEVCalso includes a Video Parameter Set (VPS) NAL unit which containsparameters describing the overall structure of the bitstream. The VPS isa new type of parameter set defined in HEVC, and applies to all of thelayers of a bitstream. A layer may contain multiple temporal sub-layers,and all version 1 bitstreams are restricted to a single layer. HEVC hascertain layered extensions for scalability and multiview and these willenable multiple layers, with a backwards compatible version 1 baselayer.

FIG. 2 illustrates a data communication system in which one or moreembodiments of the invention may be implemented. The data communicationsystem comprises a transmission device, in this case a server 201, whichis operable to transmit data packets of a data stream to a receivingdevice, in this case a client terminal 202, via a data communicationnetwork 200. The data communication network 200 may be a Wide AreaNetwork (WAN) or a Local Area Network (LAN). Such a network may be forexample a wireless network (Wifi/802.11a orb or g), an Ethernet network,an Internet network or a mixed network composed of several differentnetworks. In a particular embodiment of the invention the datacommunication system may be a digital television broadcast system inwhich the server 201 sends the same data content to multiple clients.

The data stream 204 provided by the server 201 may be composed ofmultimedia data representing video and audio data. Audio and video datastreams may, in some embodiments of the invention, be captured by theserver 201 using a microphone and a camera respectively. In someembodiments data streams may be stored on the server 201 or received bythe server 201 from another data provider, or generated at the server201. The server 201 is provided with an encoder for encoding video andaudio streams in particular to provide a compressed bitstream fortransmission that is a more compact representation of the data presentedas input to the encoder.

In order to obtain a better ratio of the quality of transmitted data toquantity of transmitted data, the compression of the video data may befor example in accordance with the HEVC format or H.264/AVC format.

The client 202 receives the transmitted bitstream and decodes thereconstructed bitstream to reproduce video images on a display deviceand the audio data by a loud speaker.

Although a streaming scenario is considered in the example of FIG. 2 ,it will be appreciated that in some embodiments of the invention thedata communication between an encoder and a decoder may be performedusing for example a media storage device such as an optical disc.

In one or more embodiments of the invention a video image is transmittedwith data representative of compensation offsets for application toreconstructed pixels of the image to provide filtered pixels in a finalimage.

FIG. 3 schematically illustrates a processing device 300 configured toimplement at least one embodiment of the present invention. Theprocessing device 300 may be a device such as a micro-computer, aworkstation or a light portable device. The device 300 comprises acommunication bus 313 connected to:

-   -   a central processing unit 311, such as a microprocessor, denoted        CPU;    -   a read only memory 306, denoted ROM, for storing computer        programs for implementing the invention;    -   a random access memory 312, denoted RAM, for storing the        executable code of the method of embodiments of the invention as        well as the registers adapted to record variables and parameters        necessary for implementing the method of encoding a sequence of        digital images and/or the method of decoding a bitstream        according to embodiments of the invention; and    -   a communication interface 302 connected to a communication        network 303 over which digital data to be processed are        transmitted or received

Optionally, the apparatus 300 may also include the following components:

-   -   a data storage means 304 such as a hard disk, for storing        computer programs for implementing methods of one or more        embodiments of the invention and data used or produced during        the implementation of one or more embodiments of the invention;    -   a disk drive 305 for a disk 306, the disk drive being adapted to        read data from the disk 306 or to write data onto said disk;    -   a screen 309 for displaying data and/or serving as a graphical        interface with the user, by means of a keyboard 310 or any other        pointing means.

The apparatus 300 can be connected to various peripherals, such as forexample a digital camera 320 or a microphone 308, each being connectedto an input/output card (not shown) so as to supply multimedia data tothe apparatus 300.

The communication bus provides communication and interoperabilitybetween the various elements included in the apparatus 300 or connectedto it. The representation of the bus is not limiting and in particularthe central processing unit is operable to communicate instructions toany element of the apparatus 300 directly or by means of another elementof the apparatus 300.

The disk 306 can be replaced by any information medium such as forexample a compact disk (CD-ROM), rewritable or not, a ZIP disk or amemory card and, in general terms, by an information storage means thatcan be read by a microcomputer or by a microprocessor, integrated or notinto the apparatus, possibly removable and adapted to store one or moreprograms whose execution enables the method of encoding a sequence ofdigital images and/or the method of decoding a bitstream according tothe invention to be implemented.

The executable code may be stored either in read only memory 306, on thehard disk 304 or on a removable digital medium such as for example adisk 306 as described previously. According to a variant, the executablecode of the programs can be received by means of the communicationnetwork 303, via the interface 302, in order to be stored in one of thestorage means of the apparatus 300 before being executed, such as thehard disk 304.

The central processing unit 311 is adapted to control and direct theexecution of the instructions or portions of software code of theprogram or programs according to the invention, instructions that arestored in one of the aforementioned storage means. On powering up, theprogram or programs that are stored in a non-volatile memory, forexample on the hard disk 304 or in the read only memory 306, aretransferred into the random access memory 312, which then contains theexecutable code of the program or programs, as well as registers forstoring the variables and parameters necessary for implementing theinvention.

In this embodiment, the apparatus is a programmable apparatus which usessoftware to implement the invention. However, alternatively, the presentinvention may be implemented in hardware (for example, in the form of anApplication Specific Integrated Circuit or ASIC).

FIG. 4 illustrates a block diagram of an encoder according to at leastone embodiment of the invention. The encoder is represented by connectedmodules, each module being adapted to implement, for example in the formof programming instructions to be executed by the CPU 311 of device 300,at least one corresponding step of a method implementing at least oneembodiment of encoding an image of a sequence of images according to oneor more embodiments of the invention.

An original sequence of digital images i0 to in 401 is received as aninput by the encoder 400. Each digital image is represented by a set ofsamples, known as pixels.

A bitstream 410 is output by the encoder 400 after implementation of theencoding process. The bitstream 410 comprises a plurality of encodingunits or slices, each slice comprising a slice header for transmittingencoding values of encoding parameters used to encode the slice and aslice body, comprising encoded video data.

The input digital images i0 to in 401 are divided into blocks of pixelsby module 402. The blocks correspond to image portions and may be ofvariable sizes (e.g. 4×4, 8×8, 16×16, 32×32, 64×64, 128×128 pixels andseveral rectangular block sizes can be also considered). A coding modeis selected for each input block. Two families of coding modes areprovided: coding modes based on spatial prediction coding (Intraprediction), and coding modes based on temporal prediction (Intercoding, Merge, SKIP). The possible coding modes are tested.

Module 403 implements an Intra prediction process, in which the givenblock to be encoded is predicted by a predictor computed from pixels ofthe neighborhood of said block to be encoded. An indication of theselected Intra predictor and the difference between the given block andits predictor is encoded to provide a residual if the Intra coding isselected.

Temporal prediction is implemented by motion estimation module 404 andmotion compensation module 405. Firstly a reference image from among aset of reference images 416 is selected, and a portion of the referenceimage, also called reference area or image portion, which is the closestarea to the given block to be encoded, is selected by the motionestimation module 404. Motion compensation module 405 then predicts theblock to be encoded using the selected area. The difference between theselected reference area and the given block, also called a residualblock, is computed by the motion compensation module 405. The selectedreference area is indicated by a motion vector.

Thus, in both cases (spatial and temporal prediction), a residual iscomputed by subtracting the prediction from the original block.

In the INTRA prediction implemented by module 403, a predictiondirection is encoded. In the temporal prediction, at least one motionvector is encoded.

Information relative to the motion vector and the residual block isencoded if the Inter prediction is selected. To further reduce thebitrate, assuming that motion is homogeneous, the motion vector isencoded by difference with respect to a motion vector predictor. Motionvector predictors of a set of motion information predictors is obtainedfrom the motion vectors field 418 by a motion vector prediction andcoding module 417.

The encoder 400 further comprises a selection module 406 for selectionof the coding mode by applying an encoding cost criterion, such as arate-distortion criterion. In order to further reduce redundancies atransform (such as DCT) is applied by transform module 407 to theresidual block, the transformed data obtained is then quantized byquantization module 408 and entropy encoded by entropy encoding module409. Finally, the encoded residual block of the current block beingencoded is inserted into the bitstream 410.

The encoder 400 also performs decoding of the encoded image in order toproduce a reference image for the motion estimation of the subsequentimages. This enables the encoder and the decoder receiving the bitstreamto have the same reference frames. The inverse quantization module 411performs inverse quantization of the quantized data, followed by aninverse transform by reverse transform module 412. The reverse intraprediction module 413 uses the prediction information to determine whichpredictor to use for a given block and the reverse motion compensationmodule 414 actually adds the residual obtained by module 412 to thereference area obtained from the set of reference images 416.

Post filtering is then applied by module 415 to filter the reconstructedframe of pixels. In the embodiments of the invention an SAO loop filteris used in which compensation offsets are added to the pixel values ofthe reconstructed pixels of the reconstructed image

FIG. 5 illustrates a block diagram of a decoder 60 which may be used toreceive data from an encoder according an embodiment of the invention.The decoder is represented by connected modules, each module beingadapted to implement, for example in the form of programminginstructions to be executed by the CPU 311 of device 300, acorresponding step of a method implemented by the decoder 60.

The decoder 60 receives a bitstream 61 comprising encoding units, eachone being composed of a header containing information on encodingparameters and a body containing the encoded video data. As explainedwith respect to FIG. 4 , the encoded video data is entropy encoded, andthe motion vector predictors' indexes are encoded, for a given block, ona predetermined number of bits. The received encoded video data isentropy decoded by module 62. The residual data are then dequantized bymodule 63 and then a reverse transform is applied by module 64 to obtainpixel values.

The mode data indicating the coding mode are also entropy decoded andbased on the mode, an INTRA type decoding or an INTER type decoding isperformed on the encoded blocks of image data.

In the case of INTRA mode, an INTRA predictor is determined by intrareverse prediction module 65 based on the intra prediction modespecified in the bitstream.

If the mode is INTER, the motion prediction information is extractedfrom the bitstream so as to find the reference area used by the encoder.The motion prediction information is composed of the reference frameindex and the motion vector residual. The motion vector predictor isadded to the motion vector residual in order to obtain the motion vectorby motion vector decoding module 70.

Motion vector decoding module 70 applies motion vector decoding for eachcurrent block encoded by motion prediction. Once an index of the motionvector predictor, for the current block has been obtained the actualvalue of the motion vector associated with the current block can bedecoded and used to apply reverse motion compensation by module 66. Thereference image portion indicated by the decoded motion vector isextracted from a reference image 68 to apply the reverse motioncompensation 66. The motion vector field data 71 is updated with thedecoded motion vector in order to be used for the inverse prediction ofsubsequent decoded motion vectors.

Finally, a decoded block is obtained. Post filtering is applied by postfiltering module 67. A decoded video signal 69 is finally provided bythe decoder 60.

CABAC

HEVC uses several types of entropy coding like the Context basedAdaptive Binary Arithmetic Coding (CABAC), Golomb-rice Code, or simplebinary representation called Fixed Length Coding. Most of the time, abinary encoding process is performed to represent the different syntaxelement. This binary encoding process is also very specific and dependson the different syntax elements. The arithmetic coding represents thesyntax element according to their current probabilities. CABAC is anextension of the arithmetic coding which separates the probabilities ofa syntax element depending on a ‘context’ defined by a context variable.This corresponds to a conditional probability. The context variable maybe derived from the value of the current syntax of the top left block(A2 in FIG. 6 b as described in more detail below) and the above leftblock (B3 in FIG. 6 b ) which are already decoded.

CABAC has been adopted as a normative part of the H.264/AVC andH.265/HEVC standards. In H.264/AVC, it is one of two alternative methodsof entropy coding. The other method specified in H.264/AVC is alow-complexity entropy-coding technique based on the usage ofcontext-adaptively switched sets of variable-length codes, so-calledContext-Adaptive Variable-Length Coding (CAVLC). Compared to CABAC,CAVLC offers reduced implementation costs at the price of lowercompression efficiency. For TV signals in standard- or high-definitionresolution, CABAC typically provides bit-rate savings of 10-20% relativeto CAVLC at the same objective video quality. In HEVC, CABAC is the onlyentropy coding method.

FIG. 17 shows the main blocks of a CABAC encoder.

An input syntax element that is non-binary valued is binarized by abinarizer 1701. The coding strategy of CABAC is based on the findingthat a very efficient coding of syntax-element values in a hybridblock-based video coder, like components of motion vector differences ortransform-coefficient level values, can be achieved by employing abinarization scheme as a kind of preprocessing unit for the subsequentstages of context modeling and binary arithmetic coding. In general, abinarization scheme defines a unique mapping of syntax element values tosequences of binary decisions, so-called bins, which can also beinterpreted in terms of a binary code tree. The design of binarizationschemes in CABAC is based on a few elementary prototypes whose structureenables simple online calculation and which are adapted to some suitablemodel-probability distributions.

Each bin can be processed in one of two basic ways according to thesetting of a switch 1702. When the switch is in the “regular” setting,the bin is supplied to a context modeler 1703 and a regular codingengine 1704. When the switch is in the “bypass” setting, the contextmodeler is bypassed and the bin is supplied to a bypass coding engine1705. Another switch 1706 has “regular” and “bypass” settings similar tothe switch 1702 so that the bins coded by the applicable one of thecoding engines 1704 and 1705 can form a bitstream as the output of theCABAC encoder.

By decomposing each syntax element value into a sequence of bins,further processing of each bin value in CABAC depends on the associatedcoding-mode decision, which can be either chosen as the regular or thebypass mode. The latter is chosen for bins related to the signinformation or for lower significant bins, which are assumed to beuniformly distributed and for which, consequently, the whole regularbinary arithmetic encoding process is simply bypassed. In the regularcoding mode, each bin value is encoded by using the regular binaryarithmetic-coding engine, where the associated probability model iseither determined by a fixed choice, without any context modeling, oradaptively chosen depending on the related context model. As animportant design decision, the latter case is generally applied to themost frequently observed bins only, whereas the other, usually lessfrequently observed bins, will be treated using a joint, typicallyzero-order probability model. In this way, CABAC enables selectivecontext modeling on a sub-symbol level, and hence, provides an efficientinstrument for exploiting inter-symbol redundancies at significantlyreduced overall modeling or learning costs. For the specific choice ofcontext models, four basic design types are employed in CABAC, where twoof them are applied to coding of transform-coefficient levels only. Thedesign of these four prototypes is based on a priori knowledge about thetypical characteristics of the source data to be modeled and it reflectsthe aim to find a good compromise between the conflicting objectives ofavoiding unnecessary modeling-cost overhead and exploiting thestatistical dependencies to a large extent.

On the lowest level of processing in CABAC, each bin value enters thebinary arithmetic encoder, either in regular or bypass coding mode. Forthe latter, a fast branch of the coding engine with a considerablyreduced complexity is used while for the former coding mode, encoding ofthe given bin value depends on the actual state of the associatedadaptive probability model that is passed along with the bin value tothe M coder—a term that has been chosen for the table-based binaryarithmetic coding engine in CABAC.

Inter Coding

HEVC uses 3 different INTER modes: the Inter mode, the Merge mode andthe Merge Skip mode. The main difference between these modes is the datasignalling in the bitstream. For the Motion vector coding, the currentHEVC standard includes a competitive based scheme for Motion vectorprediction which was not present in earlier versions of the standard. Itmeans that several candidates are competing with the rate distortioncriterion at encoder side in order to find the best motion vectorpredictor or the best motion information for respectively the Inter orthe Merge mode. An index corresponding to the best predictors or thebest candidate of the motion information is inserted in the bitstream.The decoder can derive the same set of predictors or candidates and usesthe best one according to the decoded index. In the Screen ContentExtension of HEVC, the new coding tool called Intra Block Copy issignalled as any of those three INTER modes, the difference between IBCand the equivalent INTER mode being made by checking whether thereference frame is the current one. This can be implemented e.g. bychecking the reference index of the list L0, and deducing this is IntraBlock Copy if this is the last frame in that list. Another way to do iscomparing the Picture Order Count of current and reference frames: ifequal, this is Intra Block Copy.

The design of the derivation of predictors and candidates is importantin achieving the best coding efficiency without a disproportionateimpact on complexity. In HEVC two motion vector derivations are used:one for Inter mode (Advanced Motion Vector Prediction (AMVP)) and onefor Merge modes (Merge derivation process). The following describesthese processes.

FIGS. 6 a and 6 b illustrates spatial and temporal blocks that can beused to generate motion vector predictors in Advanced Motion VectorPrediction (AMVP) and Merge modes of HEVC coding and decoding systemsand FIG. 7 shows simplified steps of the process of the AMVP predictorset derivation.

Two predictors, i.e. the two spatial motion vectors of the AMVP mode,are chosen among the top blocks (indicated by letter ‘B’) and the leftblocks (indicated by letter ‘A’) including the top corner blocks (blockB2) and left corner block (block A0) and one predictor is chosen amongthe bottom right block (H) and centre block (Center) of the collocatedblock as represented in FIG. 6 a.

Table 1 below outlines the nomenclature used when referring to blocks inrelative terms to the current block as shown in FIGS. 6 a and 6 b . Thisnomenclature is used as shorthand but it should be appreciated othersystems of labelling may be used, in particular in future versions of astandard.

TABLE 1 Block label Relative positional description of neighbouringblock A0 ‘Left corner’ - diagonally down and to the left of the currentblock A1 ‘Left’ or ‘Bottom left’ - left of the bottom of the currentblock A2 ‘Top left’ - left of the top of the current block B0 ‘Aboveright’ - diagonally up and to the right of the current block B1‘Above’ - above the top right of the current block B2 ‘Above left’ -diagonally up and to the left of the current block B3 ‘Up’ - above thetop left of the current block H Bottom right of a collocated block in areference frame Center A block within a collocated block in a referenceframe

It should be noted that the ‘current block’ may be variable in size, forexample 4×4, 16×16, 32×32, 64×64, 128×128 or any size in between. Thedimensions of a block are preferably factors of 2 (i.e. 2{circumflexover ( )}n×2Âm where n and m are positive integers) as this results in amore efficient use of bits when using binary encoding. The current blockneed not be square, although this is often a preferable embodiment forcoding complexity.

Turning to FIG. 7 , a first step aims at selecting a first spatialpredictor (Cand 1, 706) among the bottom left blocks A0 and A1, thatspatial positions are illustrated in FIG. 6 . To that end, these blocksare selected (700, 702) one after another, in the given order, and, foreach selected block, following conditions are evaluated (704) in thegiven order, the first block for which conditions are fulfilled beingset as a predictor:

-   -   the motion vector from the same reference list and the same        reference image;    -   the motion vector from the other reference list and the same        reference image;    -   the scaled motion vector from the same reference list and a        different reference image; or    -   the scaled motion vector from the other reference list and a        different reference image.

If no value is found, the left predictor is considered as beingunavailable. In this case, it indicates that the related blocks wereINTRA coded or those blocks do not exist.

A following step aims at selecting a second spatial predictor (Cand 2,716) among the above right block B0, above block B1, and left aboveblock B2, that spatial positions are illustrated in FIG. 6 . To thatend, these blocks are selected (708, 710, 712) one after another, in thegiven order, and, for each selected block, the above mentionedconditions are evaluated (714) in the given order, the first block forwhich the above mentioned conditions are fulfilled being set as apredictor.

Again, if no value is found, the top predictor is considered as beingunavailable. In this case, it indicates that the related blocks wereINTRA coded or those blocks do not exist.

In a next step (718), the two predictors, if both are available, arecompared one to the other to remove one of them if they are equal (i.e.same motion vector values, same reference list, same reference index andthe same direction type). If only one spatial predictor is available,the algorithm is looking for a temporal predictor in a following step.

The temporal motion predictor (Cand 3, 726) is derived as follows: thebottom right (H, 720) position of the collocated block in a previousframe is first considered in the availability check module 722. If itdoes not exist or if the motion vector predictor is not available, thecentre of the collocated block (Centre, 724) is selected to be checked.These temporal positions (Centre and H) are depicted in FIG. 6 . In anycase, scaling 723 is applied on those candidates to match the temporaldistance between current frame and the first frame is the referencelist.

The motion predictor value is then added to the set of predictors. Next,the number of predictors (Nb_Cand) is compared (728) to the maximumnumber of predictors (Max_Cand). As mentioned above, the maximum numberof predictors (Max_Cand) of motion vector predictors that the derivationprocess of AMVP needs to generate is two in the current version of HEVCstandard.

If this maximum number is reached, the final list or set of AMVPpredictors (732) is built. Otherwise, a zero predictor is added (730) tothe list. The zero predictor is a motion vector equal to (0, 0).

As illustrated in FIG. 7 , the final list or set of AMVP predictors(732) is built from a subset of spatial motion predictors (700 to 712)and from a subset of temporal motion predictors (720, 724).

As mentioned above, a motion predictor candidate of Merge mode or ofMerge Skip mode represents all the required motion information:direction, list, reference frame index, and motion vectors. An indexedlist of several candidates is generated by a Merge derivation process.In the current HEVC design the maximum number of candidates for bothMerge modes is equal to five (4 spatial candidates and 1 temporalcandidate).

FIG. 8 is a schematic of a motion vector derivation process of the Mergemodes. In a first step of the derivation process, five block positionsare considered (800 to 808). These positions are the spatial positionsdepicted in FIG. 3 with references A1, B1, B0, A0, and B2. In afollowing step, the availability of the spatial motion vectors ischecked and at most five motion vectors are selected (810). A predictoris considered as available if it exists and if the block is not INTRAcoded. Therefore, selecting the motion vectors corresponding to the fiveblocks as candidates is done according to the following conditions:

if the “left” A1 motion vector (800) is available (810), i.e. if itexists and if this block is not INTRA coded, the motion vector of the“left” block is selected and used as a first candidate in list ofcandidate (814);

if the “above” B1 motion vector (802) is available (810), the candidate“above” block motion vector is compared to “left” A1 motion vector(812), if it exists. If B1 motion vector is equal to A1 motion vector,B1 is not added to the list of spatial candidates (814). On thecontrary, if B1 motion vector is not equal to A1 motion vector, B1 isadded to the list of spatial candidates (814);

if the “above right” B0 motion vector (804) is available (810), themotion vector of the “above right” is compared to B1 motion vector(812). If B0 motion vector is equal to B1 motion vector, B0 motionvector is not added to the list of spatial candidates (814). On thecontrary, if B0 motion vector is not equal to B1 motion vector, B0motion vector is added to the list of spatial candidates (814);

if the “below left” A0 motion vector (806) is available (810), themotion vector of the “below left” is compared to A1 motion vector (812).If A0 motion vector is equal to A1 motion vector, A0 motion vector isnot added to the list of spatial candidates (814). On the contrary, ifA0 motion vector is not equal to A1 motion vector, A0 motion vector isadded to the list of spatial candidates (814); and if the list ofspatial candidates doesn't contain four candidates, the availability of“above left” B2 motion vector (808) is checked (810). If it isavailable, it is compared to A1 motion vector and to B1 motion vector.If B2 motion vector is equal to A1 motion vector or to B1 motion vector,B2 motion vector is not added to the list of spatial candidates (814).On the contrary, if B2 motion vector is not equal to A1 motion vector orto B1 motion vector, B2 motion vector is added to the list of spatialcandidates (814).

At the end of this stage, the list of spatial candidates comprises up tofour candidates.

For the temporal candidate, two positions can be used: the bottom rightposition of the collocated block (816, denoted H in FIG. 6 ) and thecentre of the collocated block (818). These positions are depicted inFIG. 6 .

As for the AMVP motion vector derivation process, a first step aims atchecking (820) the availability of the block at the H position. Next, ifit is not available, the availability of the block at the centreposition is checked (820). If at least one motion vector of thesepositions is available, the temporal motion vector can be scaled (822),if needed, to the reference frame having index 0, for both list L0 andL1, in order to create a temporal candidate (824) which is added to thelist of Merge motion vector predictor candidates. It is positioned afterthe spatial candidates in the list. The lists L0 and L1 are 2 referenceframe lists containing zero, one or more reference frames.

If the number (Nb_Cand) of candidates is strictly less (826) than themaximum number of candidates (Max_Cand that value is signalled in thebit-stream slice header and is equal to five in the current HEVC design)and if the current frame is of the B type, combined candidates aregenerated (828). Combined candidates are generated based on availablecandidates of the list of Merge motion vector predictor candidates. Itmainly consists in combining the motion vector of one candidate of thelist L0 with the motion vector of one candidate of list L1.

If the number (Nb_Cand) of candidates remains strictly less (830) thanthe maximum number of candidates (Max_Cand), zero motion candidates aregenerated (832) until the number of candidates of the list of Mergemotion vector predictor candidates reaches the maximum number ofcandidates.

At the end of this process, the list or set of Merge motion vectorpredictor candidates is built (834). As illustrated in FIG. 8 , the listor set of Merge motion vector predictor candidates is built (834) from asubset of spatial candidates (800 to 808) and from a subset of temporalcandidates (816, 818).

Alternative Temporal Motion Vector Prediction (ATMVP)

The alternative temporal motion vector prediction (ATMVP) is aparticular motion compensation. Instead of considering only one motioninformation for the current block from a temporal reference frame, eachmotion information of each collocated block is considered. So thistemporal motion vector prediction gives a segmentation of the currentblock with the related motion information of each sub-block as depictedin FIG. 9 .

In the current VTM reference software, ATMVP is signalled as a mergecandidate inserted in the list of Merge candidates. When ATMVP isenabled at SPS level, the maximum number of Merge candidates isincreased by one. So 6 candidates are considered instead of 5 when thismode is disabled.

In addition when this prediction is enabled at SPS level, all bins ofmerge index are context coded by CABAC. While in HEVC or when ATMVP isnot enabled at SPS level, only the first bin is context coded and theremaining bins are context by-pass coded. FIG. 10(a) illustrates thecoding of the Merge index for HEVC, or when ATMVP is not enabled at SPSlevel. This corresponds to a unary max coding. In addition the first bitis CABAC coded and the other bits are bypass CABAC coded.

FIG. 10(b) illustrates the coding of the Merge index when ATMVP isenabled at SPS level. In addition all bits are CABAC coded (from the1^(st) to the 5^(th) bit). It should be noted that each index has itsown context—in other words their probabilities are separated.

Affine Mode

In HEVC, only translation motion model is applied for motioncompensation prediction (MCP). While in the real world, there are manykinds of motion, e.g. zoom in/out, rotation, perspective motions andother irregular motions.

In the JEM, a simplified affine transform motion compensation predictionis applied and the general principle of Affine mode is described belowbased on an extract of document JVET-G1001 presented at a JVET meetingin Torino at 13-21 Jul. 2017. This entire document is herebyincorporated by reference insofar as it describes other algorithms usedin JEM.

As shown in FIG. 11(a), the affine motion field of the block isdescribed by two control point motion vectors.

The motion vector field (MVF) of a block is described by the followingequation:

$\begin{matrix}\left\{ \begin{matrix}{v_{x} = {{\frac{\left( {v_{1x} - v_{0x}} \right)}{w}x} - {\frac{\left( {v_{1y} - v_{0y}} \right)}{w}y} + v_{0x}}} \\{v_{y} = {{\frac{\left( {v_{1y} - v_{0y}} \right)}{w}x} + {\frac{\left( {v_{1x} - v_{0x}} \right)}{w}y} + v_{0y}}}\end{matrix} \right. & (1)\end{matrix}$

Where (v_(0x), v_(0y)) is motion vector of the top-left corner controlpoint, and (v_(1x), v_(1y)) is motion vector of the top-right cornercontrol point.

In order to further simplify the motion compensation prediction,sub-block based affine transform prediction is applied. The sub-blocksize M×N is derived as in Equation 2, where MvPre is the motion vectorfraction accuracy ( 1/16 in JEM), (v_(2x), v_(2y)) is motion vector ofthe bottom-left control point, calculated according to Equation 1.

$\begin{matrix}\left\{ \begin{matrix}{M = {{clip}3\left( {4,w,\frac{w \times MvPre}{\max\left( {{{abs}\left( {v_{1x} - v_{0x}} \right)},{{abs}\left( {v_{1y} - v_{0y}} \right)}} \right)}} \right)}} \\{N = {{clip}3\left( {4,h,\frac{h \times MvPre}{\max\left( {{{abs}\left( {v_{2x} - v_{0x}} \right)},{{abs}\left( {v_{2y} - v_{0y}} \right)}} \right)}} \right)}}\end{matrix} \right. & (2)\end{matrix}$

After derived by Equation 2, M and N may be adjusted downward ifnecessary to make it a divisor of w and h, respectively.

To derive motion vector of each M×N sub-block, the motion vector of thecenter sample of each sub-block, as shown in FIG. 6 a , is calculatedaccording to Equation 1, and rounded to 1/16 fraction accuracy. Thenmotion compensation interpolation filters are applied to generate theprediction of each sub-block with derived motion vector.

The affine mode is a motion compensation mode as inter modes (AMVP,Merge, Merge Skip). Its principle is to generate one motion informationper pixel according to 2 or 3 neighbouring motion information. In thecurrent VTM reference software, the affine mode derives one motioninformation for each 4×4 block as depicted in FIG. 11(a). This mode isavailable for AMVP and both Merge modes are enabled thanks to a flag.This flag is CABAC coded. In an embodiment, the context depends on thesum of affine flags of the left block (position A2 of FIG. 6 b ) and theabove left block (position B3 of FIG. 6 b ).

So three context variables (0, 1 or 2) are possible in the JEM for theaffine flag given by the following formula:Ctx=IsAffine(A2)+IsAffine(B3)

Where IsAffine(block) is a function which returns 0 if the block is notan affine block and 1 if the block is affine.

Affine Merge Candidate Derivation

In the JEM, the affine Merge mode (Merge or Merge Skip) is derived fromthe first neighbouring block which is affine among blocks at positionsA1, B1, B0, A0, B2. These positions are depicted in FIGS. 6 a and 6 b .However, how the affine parameter is derived is not completely defined,and the present invention aims to improve at least this aspect.

Affine Merge Signalling

FIG. 12 is a flow chart of the partial decoding process of some syntaxelements related to the coding mode. In this figure the Skip flag(1201), the prediction mode (1211), the Merge flag (1203) the MergeIndex (1208) and the affine flag (1207) can be decoded.

For all CU in an Inter slice, the Skip flag is decoded (1201). If the CUis not Skip (1202), the pred mode (Prediction mode) is decoded (1211).This syntax element indicates if the current CU is an Inter or an Intramode. Please note that if the CU is Skip (1202), its current mode is theInter mode. If the CU (1212), the CU is coded in AMVP or in Merge mode.If the CU is Inter (1212), the Merge flag is decoded (1203). If the CUis Merge (1204) or if the CU is Skip (1202), it is verified (1205) ifthe affine flag (1206) needs to be decoded. This flag is decoded if thecurrent CU is a 2N×2N CU, which means in the current VVC that the heightand the width of the CU shall be equal. Moreover, at least oneneighbouring CU A1 or B1 or B0 or A0 or B2 must be coded with the affinemode (Merge or AMVP). Eventually the current CU shall not be a 4×4 CUbut by default the CU 4×4 are disabled in the VTM reference software. Ifthis condition (1205) is false, it is sure that the current CU is codedwith the classical Merge mode or Merge Skip mode and a Merge Index isdecoded (1208). If the Affine Flag (1206) is set equal to 1 (1207), theCU is a Merge affine CU or a Merge Skip Affine CU and the Merge index(1208) doesn't need to be decoded. Otherwise, the current CU is aclassical (basic) Merge or Merge Skip CU and the Merge index candidate(1208) is decoded.

In this specification ‘signalling’ may refer to inserting into, orextracting from, the bitstream one or more syntax element representingthe enabling or disabling of a mode other information.

Merge Candidates Derivation

FIG. 13 is a flow chart illustrating the Merge candidates derivation.This derivation has been built on top of the Merge List derivation ofHEVC represented in FIG. 8 . The main changes compared to HEVC are theaddition of the ATMVP candidate (1319, 1321, 1323), the full duplicatechecks of candidates (1320, 1325) and a new order of the candidates. TheATMVP prediction is set as a special candidate as it represents severalmotion information of the current CU. The value of the first sub-block(top left) is compared to the temporal candidate and the temporalcandidate is not added in the list of Merge if they are equal (1320).The ATMVP candidate is not compared to other spatial candidates. Inopposite to the temporal candidate which is compared to each spatialcandidate already in the list (1325) and not added in the Mergecandidate list if it is a duplicate candidate.

When a spatial candidate is added in the list it is compared to theother spatial candidates in the list (1310) which is not the case in thefinal version of HEVC.

In the current VTM version the list of merge candidates is set as thefollowing order as it has been determined to provide the best resultsover the coding test conditions:

-   -   A1    -   B1    -   B0    -   A0    -   ATMVP    -   B2    -   TEMPORAL    -   Combined    -   Zero_MV

It is important to note that spatial candidate B2 is set after the ATMVPcandidate.

In addition, when ATMVP is enabled at slice level the maximum number inthe list of candidates is 6 instead of 5.

Exemplary embodiments of the invention will now be described withreference to FIGS. 14-17, 19 and 20 . It should be noted that theembodiments may be combined unless explicitly stated otherwise; forexample certain combinations of embodiments may improve codingefficiency at increased complexity, but this may be acceptable incertain use cases.

First Embodiment

As noted above, in the current VTM reference software, ATMVP issignalled as a Merge candidate inserted in the list of Merge candidates.ATMVP can be enabled or disabled for a whole sequence (at SPS level).When ATMVP is disabled, the maximum number of Merge candidates is 5.When ATMVP is enabled, the maximum number of Merge candidates isincreased by one from 5 to 6.

In the encoder, the list of Merge candidates is generated using themethod of FIG. 13 . One Merge candidate is selected from the list ofMerge candidates, for example based on a rate-distortion criterion. Theselected Merge candidate is signalled to the decoder in the bitstreamusing a syntax element called the Merge index.

In the current VTM reference software, the manner of coding the Mergeindex is different depending on whether ATMVP is enabled or disabled.

FIG. 10(a) illustrates the coding of the Merge index when ATMVP is notenabled at SPS level. The 5 Merge candidates Cand0, Cand1, Cand2, Cand3and Cand4 are coded 0, 10, 110, 1110 and 1111 respectively. Thiscorresponds to a unary max coding. In addition, the first bit is codedby CABAC using a single context and the other bits are bypass coded.

FIG. 10(b) illustrates the coding of the Merge index when ATMVP isenabled. The 6 Merge candidates Cand0, Cand1, Cand2, Cand3, Cand4 andCand5 are coded 0, 10, 110, 1110, 11110 and 11111 respectively. In thiscase, all bits of the merge index (from the 1^(st) to the 5^(th) bit)are context coded by CABAC. Each bit has its own context and there areseparate probability models for the different bits.

In the first embodiment of the present invention, as shown in FIG. 14 ,when ATMVP is included as a Merge candidate in the list of Mergecandidates (for example, when ATMVP is enabled at SPS level) the codingof the Merge index is modified so that only the first bit of the Mergeindex is coded by CABAC using a single context. The context is set inthe same manner as in the current VTM reference software when ATMVP isnot enabled at SPS level The other bits (from the 2^(nd) to the 5^(th)bit) are bypass coded. When ATMVP is not included as a Merge candidatein the list of Merge candidates (for example, when ATMVP is disabled atSPS level) there are 5 Merge candidates. Only the first bit of the Mergeindex is coded by CABAC using a single context. The context is set inthe same manner as in the current VTM reference software when ATMVP isnot enabled at SPS level The other bits (from the 2^(nd) to the 4^(th)bit) are bypass decoded.

The decoder generates the same list of Merge candidates as the encoder.This may be accomplished by using the method of FIG. 13 . When ATMVP isnot included as a Merge candidate in the list of Merge candidates (forexample, when ATMVP is disabled at SPS level) there are 5 Mergecandidates. Only the first bit of the Merge index is decoded by CABACusing a single context. The other bits (from the 2^(nd) to the 4^(th)bit) are bypass decoded. In contrast to the current reference software,when ATMVP is included as a Merge candidate in the list of Mergecandidates (for example, when ATMVP is enabled at SPS level), only thefirst bit of the Merge index is decoded by CABAC using a single contextin the decoding of the Merge index. The other bits (from the 2^(nd) tothe 5^(th) bit) are bypass decoded. The decoded merge index is used toidentify the Merge candidate selected by the encoder from among the listof Merge candidates.

The advantage of this embodiment compared to the VTM2.0 referencesoftware is a complexity reduction of the merge index decoding anddecoder design (and encoder design) without impact on coding efficiency.Indeed, with this embodiment only 1 CABAC state is needed for the Mergeindex instead of 5 for the current VTM Merge index coding/decoding.Moreover, it reduces the worst-case complexity because the other bitsare CABAC bypass coded which reduces the number of operations comparedto coding all bits with CABAC.

Second Embodiment

In a second embodiment, all bits of the Merge index are CABAC coded butthey all share the same context. There may be a single context as in thefirst embodiment, which in this case is shared among the bits. As aresult, when ATMVP is included as a Merge candidate in the list of Mergecandidates (for example, when ATMVP is enabled at SPS level), only onecontext is used, compared to 5 in the VTM2.0 reference software. Theadvantage of this embodiment compared to the VTM2.0 reference softwareis a complexity reduction of the merge index decoding and decoder design(and encoder design) without impact on coding efficiency.

Alternatively, as described below in connection with the third tofifteenth embodiments, a context variable may be shared among the bitsso that two or more contexts are available but the current context isshared by the bits.

When ATMVP is disabled the same context is still used for all bits.

This embodiment and all subsequent embodiments can be applied even ifATMVP is not an available mode or is disabled.

In a variant of the second embodiment, any two or more bits of the Mergeindex are CABAC coded and share the same context. Other bits of theMerge index are bypass coded. For example, the first N bits of the Mergeindex may be CABAC coded, where N is two or more.

Third Embodiment

In the first embodiment the first bit of the Merge index was CABAC codedusing a single context.

In the third embodiment, a context variable for a bit of the Merge indexdepends on the value of the Merge index of a neighbouring block. Thisallows more than one context for the target bit, with each contextcorresponding to a different value of the context variable.

The neighbouring block may be any block already decoded, so that itsMerge index is available to the decoder by the time the current block isbeing decoded. For example, the neighbouring block may be any of theblocks A0, A1, A2, B0, B1, B2 and B3 shown in FIG. 6 b.

In a first variant, just the first bit is CABAC coded using this contextvariable.

In a second variant, the first N bits of the Merge index, where N is twoor more, are CABAC coded and the context variable is shared among thoseN bits.

In a third variant, any N bits of the Merge index, where N is two ormore, are CABAC coded and the context variable is shared among those Nbits.

In a fourth variant, the first N bits of the Merge index, where N is twoor more, are CABAC coded and N context variables are used for those Nbits. Assuming the context variables have K values, K×N CABAC states areused. For example, in the present embodiment, with one neighbouringblock, the context variable may conveniently have 2 values, e.g. 0and 1. In other words 2N CABAC states are used.

In a fifth variant, any N bits of the Merge index, where N is two ormore, are adaptive-PM coded and N context variables are used for those Nbits.

The same variants are applicable to the fourth to sixteenth embodimentsdescribed hereinafter.

Fourth Embodiment

In the fourth embodiment, the context variable for a bit of the Mergeindex depends on the respective values of the Merge index of two or moreneighbouring blocks. For example, a first neighbouring block may be aleft block A0, A1 or A2 and a second neighbouring block may be an upperblock B0, B1, B2 or B3. The manner of combining the two or more Mergeindex values is not particularly limited. Examples are given below.

The context variable may conveniently have 3 different values, e.g. 0, 1and 2, in this case as there are two neighbouring blocks. If the fourthvariant described in connection with the third embodiment is applied tothis embodiment with 3 different values, therefore, K is 3 instead of 2.In other words 3N CABAC states are used.

Fifth Embodiment

In the fifth embodiment, the context variable for a bit of the Mergeindex depends on the respective values of the Merge index of theneighbouring blocks A2 and B3.

Sixth Embodiment

In the sixth embodiment, the context variable for a bit of the Mergeindex depends on the respective values of the Merge index of theneighbouring blocks A1 and B1. The advantage of this variant isalignment with the Merge candidates derivation. As a result, in somedecoder and encoder implementations, memory access reductions can beachieved.

Seventh Embodiment

In the seventh embodiment, the context variable for a bit having bitposition idx_num in the Merge Index of the current block is obtainedaccording to the following formula:ctxIdx=(Merge_index_left==idx_num)+(Merge_index_up==idx_num)

where Merge_index_left is the Merge index for a left block,Merge_index_up is the Merge index for an upper block, and the symbol ==is the equality symbol.

When there are 6 Merge candidates, for example, 0<=idx_num<=5.

The left block may be the block A1 and the upper block may be the blockB1 (as in the sixth embodiment). Alternatively, the left block may bethe block A2 and the upper block may be the block B3 (as in the fifthembodiment).

The formula (Merge_index_left==idx_num) is equal to 1 if the Merge indexfor the left block is equal to idx_num. The following table gives theresults of this formula (Merge_index_left==idx_num):

idx_num Merge_index_left 0 1 2 3 4 0 1 0 0 0 0 1 0 1 0 0 0 2 0 0 1 0 0 30 0 0 1 0 4 0 0 0 0 1 5 0 0 0 0 0

Of course the table of the formula (Merge_index_up==idx_num) is thesame.

The following table gives the unary max code of each Merge index valueand the relative bit position for each bit. This table corresponds toFIG. 10(b).

Unary max code Merge_index_left 0 1 2 3 4 0 0 1 1 0 2 1 1 0 3 1 1 1 0 41 1 1 1 0 5 1 1 1 1 1

If the left block is not a merge block or an affine merge block it isconsidered that the left block is not available. The same condition isapplied for the upper block.

For example, when only the first bit is CABAC coded, the contextvariable ctxIdx is set equal to:

0 if no left and up block has a merge index or if the left block Mergeindex is not the first index (i.e. not 0) and if the upper block Mergeindex is not the first index (i.e. not 0);

1 if one but not the other of the left and upper blocks has its mergeindex equal to the first index; and

2 if for each of the left and upper blocks the merge index is equal tothe first index.

More generally, for a target bit at position idx_num which is CABACcoded, the context variable ctxIdx is set equal to:

0 if no left and up block has a merge index or if the left block Mergeindex is not the i^(th) index (where i=idx_num) and if the upper blockMerge index is not the i^(th) index;

1 if one but not the other of the left and upper blocks has its mergeindex equal to the the i^(th) index; and

2 if for each of the left and upper blocks the merge index is equal tothe i^(th) index. Here, the i^(th) index means the first index when i=0,the second index when i=1, and so on.

Eighth Embodiment

In the eighth embodiment, the context variable for a bit having bitposition idx_num in the Merge Index of the current block is obtainedaccording to the following formula:

Ctx=(Merge_index_left>idx_num)+(Merge_index_up>idx_num) whereMerge_index_left is the Merge index for a left block, Merge_index_up isthe Merge index for an upper block, and the symbol > means “greaterthan”.

When there are 6 Merge candidates, for example, 0<=idx_num<=5.

The left block may be the block A1 and the upper block may be the blockB1 (as in the fifth embodiment). Alternatively, the left block may bethe block A2 and the upper block may be the block B3 (as in the sixthembodiment).

The formula (Merge_index_left>idx_num) is equal to 1 if the Merge indexfor the left block is greater than idx_num. If the left block is not amerge block or an affine merge block it is considered that the leftblock is not available. The same condition is applied for the upperblock.

The following table gives the results of this formula(Merge_index_left>idx_num):

idx_num Merge_index_left 0 1 2 3 4 0 0 0 0 0 0 1 1 0 0 0 0 2 1 1 0 0 0 31 1 1 0 0 4 1 1 1 1 0 5 1 1 1 1 1

For example, when only the first bit is CABAC coded, the contextvariable ctxIdx is set equal to:

0 if no left and up block has a merge index or if the left block Mergeindex is less than or equal to the first index (i.e. not 0) and if theupper block Merge index is less than or equal to the first index (i.e.not 0);

1 if one but not the other of the left and upper blocks has its mergeindex greater than the first index; and

2 if for each of the left and upper blocks the merge index is greaterthan the first index.

More generally, for a target bit at position idx_num which is CABACcoded, the context variable ctxIdx is set equal to:

0 if no left and up block has a merge index or if the left block Mergeindex is less than the i^(th) index (where i=idx_num) and if the upperblock Merge index is less than or equal to the i^(th) index;

1 if one but not the other of the left and upper blocks has its mergeindex greater than the the i^(th) index; and

2 if for each of the left and upper blocks the merge index is greaterthan the i^(th) index.

The eighth embodiment provides a further coding efficiency increase overthe seventh embodiment.

Ninth Embodiment

In the fourth to eighth embodiments, the context variable for a bit ofthe Merge index of the current block depended on the respective valuesof the Merge index of two or more neighbouring blocks.

In the ninth embodiment, the context variable for a bit of the Mergeindex of the current block depends on the respective Merge flags of twoor more neighbouring blocks. For example, a first neighbouring block maybe a left block A0, A1 or A2 and a second neighbouring block may be anupper block B0, B1, B2 or B3.

The Merge flag is set to 1 when a block is encoded using the Merge mode,and is set to 0 when another mode such as Skip mode or Affine Mergemode. Note that in VMT2.0 Affine Merge is a distinct mode from the basicor “classical” Merge mode. The Affine Merge mode may be signalled usinga dedicated Affine flag. Alternatively, the list of Merge candidates mayinclude an Affine Merge candidate, in which case the Affine Merge modemay be selected and signalled using the Merge index.

The context variable is then set to:

0 if neither the left nor the upper neighbouring block has its Mergeflag set to 1;

1 if one but not the other of the left and upper neighbouring blocks hasits Merge flag set to 1; and

2 if each of the left and upper neighbouring blocks has its Merge flagset to 1.

This simple measure achieves a coding efficiency improvement overVTM2.0. Another advantage, compared to the seventh and eighthembodiments, is a lower complexity because only the Merge flags and notthe Merge indexes of the neighbouring blocks need to be checked.

In a variant, the context variable for a bit of the Merge index of thecurrent block depends on the Merge flag of a single neighbouring block.

Tenth Embodiment

In the third to ninth embodiments, the context variable for a bit of theMerge index of the current block depended on Merge index values or Mergeflags of one or more neighbouring blocks.

In the tenth embodiment, the context variable for a bit of the Mergeindex of the current block depends on the value of the Skip flag for thecurrent block (current Coding Unit, or CU). The Skip flag is equal to 1when the current block uses the Merge Skip mode, and is equal to 0otherwise.

The Skip flag is a first example of another variable or syntax elementalready been decoded or parsed for the current block. This othervariable or syntax element preferably is an indicator of a complexity ofthe motion information in the current block. Since the occurrences ofthe Merge index values depend on the complexity of the motioninformation a variable or syntax element such as the Skip flag isgenerally correlated with the merge index value.

More specifically, the Merge Skip mode is generally selected for staticscenes or scenes involving constant motion. Consequently, the mergeindex value is generally lower for the Merge Skip mode than for theclassical merge mode which is used to encode an inter prediction whichcontains a block residual. This occurs generally for more complexmotion. However, the selection between these modes is also often relatedto the quantization and/or the RD criterion.

This simple measure provides a coding efficiency increase over VTM2.0.It is also very simple to implement as it does not involve neighbouringblocks or checking Merge index values.

In a first variant, the context variable for a bit of the Merge index ofthe current block is simply set equal to the Skip flag of the currentblock. The bit may be the first bit only. Other bits are bypass coded asin the first embodiment.

In a second variant, all bits of the Merge index are CABAC coded andeach of them has its own context variable depending on the Merge flag.This requires 10 states of probabilities when there are 5 CABAC-codedbits in the Merge index (corresponding to 6 Merge candidates).

In a third variant, to limit the number of states, only N bits of theMerge index are CABAC coded, where N is two or more, for example thefirst N bits. This requires 2N states. For example, when the first 2bits are CABAC coded, 4 states are required.

Generally, in place of the Skip flag, it is possible to use any othervariable or syntax element that has already been decoded or parsed forthe current block and that is an indicator of a complexity of the motioninformation in the current block.

Eleventh Embodiment

The eleventh embodiment relates to Affine Merge signalling as describedpreviously with reference to FIGS. 11(a), 11(b) and 12.

In the eleventh embodiment, the context variable for a CABAC coded bitof the Merge index of the current block (current CU) depends on theAffine Merge candidates, if any, in the list of Merge candidates. Thebit may be the first bit only of the Merge index, or the first N bits,where N is two or more, or any N bits. Other bits are bypass coded.

Affine prediction is designed for compensating complex motion.Accordingly, for complex motion the merge index generally has highervalues than for less complex motion. It follows that if the first affinemerge candidate is far down the list, or if there is no affine mergecandidate at all, the merge index of the current CU is likely to have asmall value.

It is therefore effective for the context variable to depend on thepresence and/or position of at least one Affine Merge candidate in thelist.

For example, the context variable may be set equal to:

1 if A1 is affine

2 if B1 is affine

3 if B0 is affine

4 if A0 is affine

5 if B2 is affine

0 if no neighbouring block is affine.

When the Merge index of the current block is decoded or parsed theaffine flags of the Merge candidates at these positions have alreadybeen checked. Consequently, no further memory accesses are needed toderive the context for the Merge index of the current block.

This embodiment provides a coding efficiency increase over VTM2.0. Noadditional memory accesses are required since step 1205 already involveschecking the neighbouring CU affine modes.

In a first variant, to limit the number of states, the context variablemay be set equal to:

0 if no neighbouring block is affine, or if A1 or B1 is affine

1 if B0, A0 or B2 is affine

In a second variant, to limit the number of states, the context variablemay be set equal to:

0 if no neighbouring block is affine

1 if A1 or B1 is affine

2 if B0, A0 or B2 is affine

In a third variant, the context variable may be set equal to:

1 if A1 is affine

2 if B1 is affine

3 if B0 is affine

4 if A0 or B2 is affine

0 if no neighbouring block is affine.

Please note that these positions are already checked when the mergeindex is decoded or parsed because the affine flag decoding depends onthese positions. Consequently, there is no need for additional memoryaccess to derive the Merge index context which is coded after the affineflag.

Twelfth Embodiment

In the twelfth embodiment signalling the affine mode comprises theaffine mode comprises inserting affine mode as a candidate motionpredictor.

In one example of the twelfth embodiment, the Affine Merge (and MergeSkip) is signalled as a Merge candidate. In that case the modules 1205,1206 and 1207 of FIG. 12 are removed. In addition, not to affect thecoding efficiency of the Merge mode, the maximum possible number ofmerge candidates is incremented. For example, in the current VTM versionthis value is set equal to 6, so with if applying this embodiment to thecurrent version of VTM, the value would be 7.

The advantage is a design simplification of the syntax element of Mergemode because fewer syntax elements need to be decoded. In somecircumstances, a coding efficiency can be observed.

Two possibilities to implement this example will now be described:

The Affine Merge index always has the same position inside the listwhatever the value of the other Merge MV. The position of a candidatemotion predictor indicates its likelihood of being selected and as suchif it placed higher up the list (a lower index value), that motionvector predictor is more likely to be selected.

In the first example, the affine Merge index always has the sameposition inside the list of Merge candidates. This means that it has afixed Merge idx value. For example this value can be set equal to 5, asthe affine merge mode should represent complex motion which is not themost probable content. The additional advantage of this embodiment isthat when the current block is parsed (decoding/reading of the syntaxelement only but not decoding the data itself), the current block can beset as affine block. Consequently the value can be used to determine theCABAC context for the affine flag which is used for AMVP. So theconditional probabilities should be improved for this affine flag andthe coding efficiency should be better.

In a second example, the affine Merge candidate is derived with otherMerge candidates. In this example, a new affine Merge candidate is addedinto the list of Merge candidates. FIG. 18 illustrates this example.Compared to FIG. 13 , the Affine candidate is the first affineneighbouring block A1, B1, B0, A0 B2 (1917). If the same condition as1205 of FIG. 12 is valid (1927), the motion vector field produced withthe affine parameters is generated to obtain the affine candidate(1929). The list of initial candidates can have 4, 5, 6 or 7 candidatesaccording to the usage of ATMVP, Temporal and Affine candidates.

The order between all these candidate is important as more likelycandidates should be processed first to ensure they are more likely tomake the cut of motion vector candidates—a preferred ordering is thefollowing:

A1

B1

B0

A0

AFFINE MERGE

ATMVP

B2

TEMPORAL

Combined

Zero_MV

It is important to note that the Affine Merge is before the ATMVP modebut after the four main neighbouring blocks. An advantage to set theaffine Merge before the ATMVP candidate is a coding efficiency increase,as compared to setting it after the ATMVP and the temporal predictor.This coding efficiency increase depends on the GOP (group of pictures)structure and Quantization Parameter (QP) setting of each picture in theGOP. But for the most use GOP and QP setting this order give a codingefficiency increase.

A further advantage of this solution is a clean design of the Merge andMerge Skip for both syntax and derivation. Moreover, the affinecandidate merge index can change according to the availability or value(duplicate check) of previous candidates in the list. Consequently anefficient signalization can be obtained.

In a further example, the affine Merge index is variable according toone or several conditions.

For example, the Merge index or the position inside the list associatedwith the affine candidate changes according to a criterion. Theprinciple is to set a low value for merge index corresponding to theaffine merge when the affine merge has a high probability to be selected(and a higher value when there is low probability to be selected).

In the twelfth embodiment, the affine merge candidate has a merge indexvalue. To improve the coding efficiency of the Merge index it iseffective to make the context variable for a bit of the Merge indexdepend on the affine flags for neighbouring blocks and/or for thecurrent block.

For example, the context variable may be determined using the followingformula:ctxIdx=IsAffine(A1)+IsAffine(B1)+IsAffine(B0)+IsAffine(A0)+IsAffine(B2)

The resulting context value may have the value 0, 1, 2, 3 or 4.

The affine flags increase the coding efficiency.

In a first variant, to involve fewer neighbouring blocks,ctxIdx=IsAffine(A1)+IsAffine(B1). The resulting context value may havethe value 0, 1, or 2.

In a second variant, also involving fewer neighbouring blocks,ctxIdx=IsAffine(A2)+IsAffine(B3). Again, the resulting context value mayhave the value 0, 1, or 2.

In a third variant, involving no neighbouring blocks,ctxIdx=IsAffine(current block). The resulting context value may have thevalue 0 or 1.

FIG. 16 is a flow chart of the partial decoding process of some syntaxelements related to the coding mode with the third variant. In thisfigure the Skip flag (1601), the prediction mode (1611), the Merge flag(1603), the Merge Index (1608) and the affine flag (1606) can bedecoded. This flow chart is similar to that of FIG. 12 , describedhereinbefore, and a detailed description is therefore omitted. Thedifference is that there is a merge index for the Affine Merge flag,which is not the case in VTM 2.0. In VTM2.0 the Affine flag of thecurrent block cannot be used to obtain a context for the Merge indexbecause it always has the same value ‘0’.

Thirteenth Embodiment

In the tenth embodiment, the context variable for a bit of the Mergeindex of the current block depended on the value of the Skip flag forthe current block (current Coding Unit, or CU).

In the thirteenth embodiment, instead of using the Skip flag valuedirectly to derive the context variable for the target bit of the Mergeindex, the context value for the target bit is derived from the contextvariable for the Skip flag of the current CU. This is possible becausethe Skip flag is itself CABAC coded and therefore has a contextvariable.

Preferably, the context variable for the target bit of the Merge indexof the current CU is set equal to (copied from) the context variable forthe Skip flag of the current CU.

The target bit may be the first bit only. Other bits are bypass coded asin the first embodiment.

The context variable for the Skip flag of the current CU is derived inthe manner prescribed in VTM2.0. The advantage of this embodimentcompared to the VTM2.0 reference software is a complexity reduction ofthe merge index decoding and decoder design (and encoder design) withoutimpact on coding efficiency. Indeed, with this embodiment, at theminimum only 1 CABAC state is needed for the Merge index instead of 5for the current VTM Merge index coding/decoding. Moreover, it reducesthe worst-case complexity because the other bits are CABAC bypass codedwhich reduces the number of operations compared to coding all bits withCABAC.

Fourteenth Embodiment

In the thirteenth embodiment, the context value for the target bit wasderived from the context variable for the Skip flag of the current CU.

In the fourteenth embodiment, the context value for the target bit isderived from the context variable for the affine flag of the current CU.

This is possible because the affine flag is itself CABAC coded andtherefore has a context variable.

Preferably, the context variable for the target bit of the Merge indexof the current CU is set equal to (copied from) the context variable forthe affine flag of the current CU.

The target bit may be the first bit only. Other bits are bypass coded asin the first embodiment.

The context variable for the affine flag of the current CU is derived inthe manner prescribed in VTM2.0.

The advantage of this embodiment compared to the VTM2.0 referencesoftware is a complexity reduction of the merge index decoding anddecoder design (and encoder design) without impact on coding efficiency.Indeed, with this embodiment, at the minimum only 1 CABAC state isneeded for the Merge index instead of 5 for the current VTM Merge indexcoding/decoding. Moreover, it reduces the worst-case complexity becausethe other bits are CABAC bypass coded which reduces the number ofoperations compared to coding all bits with CABAC.

Fifteenth Embodiment

In several of the foregoing embodiments, the context variable had morethan 2 values, for example the three values 0, 1 and 2. However, toreduce the complexity, and reduce the number of states to be handled, itis possible to cap the number of permitted context-variable values at 2,e.g. 0 and 1. This can be accomplished, for example, by changing anyinitial context variable having the value 2 to 1. In practice, thissimplification has no or only a limited impact on the coding efficiency.

Combinations of Embodiments

Any two or more of the foregoing embodiments may be combined.

The preceding description has focussed on the encoding and decoding ofthe Merge index. For example, the first embodiment involves generating alist of merge candidates including an ATMVP candidate; selecting one ofthe merge candidates in the list; and generating a merge index for theselected merge candidate using CABAC coding, one or more bits of themerge index being bypass CABAC coded. In principle, the presentinvention can be applied to modes other than the Merge mode that involvegenerating a list of motion vector predictor (MVP) candidates; selectingone of the MVP candidates in the list; and generating an index for theselected MVP candidate. Thus, the present invention is not limited tothe Merge mode and the index to be encoded or decoded is not limited tothe Merge index. For example, in the development of VVC, it isconceivable that the techniques of the foregoing embodiments could beapplied to extended to a mode other than the Merge mode, such as theAMVP mode of HEVC or its equivalent mode in VVC. The appended claims areto be interpreted accordingly.

Implementation of Embodiments of the Invention

FIG. 20 is a schematic block diagram of a computing device 2000 forimplementation of one or more embodiments of the invention. Thecomputing device 2000 may be a device such as a micro-computer, aworkstation or a light portable device. The computing device 2000comprises a communication bus connected to: —a central processing unit(CPU) 2001, such as a microprocessor; —a random access memory (RAM) 2002for storing the executable code of the method of embodiments of theinvention as well as the registers adapted to record variables andparameters necessary for implementing the method for encoding ordecoding at least part of an image according to embodiments of theinvention, the memory capacity thereof can be expanded by an optionalRAM connected to an expansion port for example; —a read only memory(ROM) 2003 for storing computer programs for implementing embodiments ofthe invention; —a network interface (NET) 2004 is typically connected toa communication network over which digital data to be processed aretransmitted or received. The network interface (NET) 2004 can be asingle network interface, or composed of a set of different networkinterfaces (for instance wired and wireless interfaces, or differentkinds of wired or wireless interfaces). Data packets are written to thenetwork interface for transmission or are read from the networkinterface for reception under the control of the software applicationrunning in the CPU 2001; —a user interface (UI) 2005 may be used forreceiving inputs from a user or to display information to a user; —ahard disk (HD) 2006 may be provided as a mass storage device; —anInput/Output module (IO) 2007 may be used for receiving/sending datafrom/to external devices such as a video source or display. Theexecutable code may be stored either in the ROM 2003, on the HD 2006 oron a removable digital medium such as, for example a disk. According toa variant, the executable code of the programs can be received by meansof a communication network, via the NET 2004, in order to be stored inone of the storage means of the communication device 2000, such as theHD 2006, before being executed. The CPU 2001 is adapted to control anddirect the execution of the instructions or portions of software code ofthe program or programs according to embodiments of the invention, whichinstructions are stored in one of the aforementioned storage means.After powering on, the CPU 2001 is capable of executing instructionsfrom main RAM memory 2002 relating to a software application after thoseinstructions have been loaded from the program ROM 2003 or the HD 2006,for example. Such a software application, when executed by the CPU 2001,causes the steps of the method according to the invention to beperformed.

It is also understood that according to another embodiment of thepresent invention, a decoder according to an aforementioned embodimentis provided in a user terminal such as a computer, a mobile phone (acellular phone), a table or any other type of a device (e.g. a displayapparatus) capable of providing/displaying a content to a user.According to yet another embodiment, an encoder according to anaforementioned embodiment is provided in an image capturing apparatuswhich also comprises a camera, a video camera or a network camera (e.g.a closed-circuit television or video surveillance camera) which capturesand provides the content for the encoder to encode. Two such examplesare provided below with reference to FIGS. 20 and 21 .

FIG. 20 is a diagram illustrating a network camera system 2100 includinga network camera 2102 and a client apparatus 2104.

The network camera 2102 includes an imaging unit 2106, an encoding unit2108, a communication unit 2110, and a control unit 2112.

The network camera 2102 and the client apparatus 2104 are mutuallyconnected to be able to communicate with each other via the network 200.

The imaging unit 2106 includes a lens and an image sensor (e.g., acharge coupled device (CCD) or a complementary metal oxide semiconductor(CMOS)), and captures an image of an object and generates image databased on the image. This image can be a still image or a video image.The imaging unit may also comprise zooming means and/or panning meanswhich are adapted to zoom or pan (either optically or digitally)respectfully.

The encoding unit 2108 encodes the image data by using said encodingmethods explained in first to fifthteenth embodiments. The encoding unit2108 uses at least one of encoding methods explained in first tofifthteenth embodiments. For another instance, the encoding unit 2108can use combination of encoding methods explained in first tofifthteenth embodiments.

The communication unit 2110 of the network camera 2102 transmits theencoded image data encoded by the encoding unit 2108 to the clientapparatus 2104.

Further, the communication unit 2110 receives commands from clientapparatus 2104. The commands include commands to set parameters for theencoding of the encoding unit 2108.

The control unit 2112 controls other units in the network camera 2102 inaccordance with the commands received by the communication unit 2110.

The client apparatus 2104 includes a communication unit 2114, a decodingunit 2116, and a control unit 2118.

The communication unit 2118 of the client apparatus 2104 transmits thecommands to the network camera 2102.

Further, the communication unit 2118 of the client apparatus 2104receives the encoded image data from the network camera 2102.

The decoding unit 2116 decodes the encoded image data by using saiddecoding methods explained in any of the first to fifthteenthembodiments. For another instance, the decoding unit 2116 can usecombination of decoding methods explained in the first to fifthteenthembodiments.

The control unit 2118 of the client apparatus 2104 controls other unitsin the client apparatus 2104 in accordance with the user operation orcommands received by the communication unit 2114.

The control unit 2118 of the client apparatus 2104 controls a displayapparatus 2120 so as to display an image decoded by the decoding unit2116.

The control unit 2118 of the client apparatus 2104 also controls adisplay apparatus 2120 so as to display GUI (Graphical User Interface)to designate values of the parameters for the network camera 2102includes the parameters for the encoding of the encoding unit 2108.

The control unit 2118 of the client apparatus 2104 also controls otherunits in the client apparatus 2104 in accordance with user operationinput to the GUI displayed by the display apparatus 2120.

The control unit 2118 of the client apparatus 2104 controls thecommunication unit 2114 of the client apparatus 2104 so as to transmitthe commands to the network camera 2102 which designate values of theparameters for the network camera 2102, in accordance with the useroperation input to the GUI displayed by the display apparatus 2120.

The network camera system 2100 may determine if the camera 2102 utilizeszoom or pan during the recording of video, and such information may beused when encoding a video stream as zooming or panning during filmingmay benefit from the use of affine mode which is well-suited to codingcomplex motion such as zooming, rotating and/or stretching (which may beside-effects of panning, in particular if the lens is a ‘fish eye’lens).

FIG. 21 is a diagram illustrating a smart phone 2200.

The smart phone 2200 includes a communication unit 2202, adecoding/encoding unit 2204, a control unit 2206 and a display unit2208.

the communication unit 2202 receives the encoded image data via network.

The decoding unit 2204 decodes the encoded image data received by thecommunication unit 2202.

The decoding unit 2204 decodes the encoded image data by using saiddecoding methods explained in first to fifthteenth embodiments. Thedecoding unit 2204 can use at least one of decoding methods explained infirst to fifthteenth embodiments. For another instance, the encodingunit 2202 can use combination of decoding methods explained in first tofifthteenth embodiments.

The control unit 2206 controls other units in the smart phone 2200 inaccordance with a user operation or commands received by thecommunication unit 2202.

For example, the control unit 2206 controls a display apparatus 2208 soas to display an image decoded by the decoding unit 2204.

The smart phone may further comprise an image recording device 2210 (forexample a digital camera an associated circuitry) to record images orvideos. Such recorded images or videos may be encoded by thedecoding/encoding unit 2204 under instruction of the control unit 2206.

The smart phone may further comprise sensors 2212 adapted to sense theorientation of the mobile device. Such sensors could include anaccelerometer, gyroscope, compass, global positioning (GPS) unit orsimilar positional sensors. Such sensors 2212 can determine if the smartphone changes orientation and such information may be used when encodinga video stream as a change in orientation during filming may benefitfrom the use of affine mode which is well-suited to coding complexmotion such as rotations.

Alternatives and Modifications

It will be appreciated that an object of the present invention is toensure that affine mode is utilised in a most efficient manner, andcertain examples discussed above relate to signalling the use of affinemode in dependence on a perceived likelihood of affine mode beinguseful. A further example of this may apply to encoders when it is knownthat complex motion (where an affine transform may be particularlyefficient) is being encoded. Examples of such cases include:

a) A camera zooming in/out

b) A portable camera (e.g. a mobile phone) changing orientation duringfilming (i.e. a rotational movement)

c) A ‘fisheye’ lens camera panning (e.g. a stretching/distortion of aportion of the image

As such, an indication of complex motion may be raised during therecording process so that affine mode may be given a higher likelihoodof being used for the slice, sequence of frames or indeed the entirevideo stream.

In a further example, affine mode may be given a higher likelihood ofbeing used depending on a feature or functionality of the device used torecord the video. For example, a mobile device may be more likely tochange orientation than (say) a fixed security camera so affine mode maybe more appropriate for encoding video from the former. Examples offeatures or functionality include: the presence/use of zooming means,the presence/use of a positional sensor, the presence/use of panningmeans, whether or not the device is portable, or a user-selection on thedevice.

While the present invention has been described with reference toembodiments, it is to be understood that the invention is not limited tothe disclosed embodiments. It will be appreciated by those skilled inthe art that various changes and modification might be made withoutdeparting from the scope of the invention, as defined in the appendedclaims. All of the features disclosed in this specification (includingany accompanying claims, abstract and drawings), and/or all of the stepsof any method or process so disclosed, may be combined in anycombination, except combinations where at least some of such featuresand/or steps are mutually exclusive. Each feature disclosed in thisspecification (including any accompanying claims, abstract and drawings)may be replaced by alternative features serving the same, equivalent orsimilar purpose, unless expressly stated otherwise. Thus, unlessexpressly stated otherwise, each feature disclosed is one example onlyof a generic series of equivalent or similar features.

It is also understood that any result of comparison, determination,assessment, selection, execution, performing, or consideration describedabove, for example a selection made during an encoding or filteringprocess, may be indicated in or determinable/inferable from data in abitstream, for example a flag or data indicative of the result, so thatthe indicated or determined/inferred result can be used in theprocessing instead of actually performing the comparison, determination,assessment, selection, execution, performing, or consideration, forexample during a decoding process.

In the claims, the word “comprising” does not exclude other elements orsteps, and the indefinite article “a” or “an” does not exclude aplurality. The mere fact that different features are recited in mutuallydifferent dependent claims does not indicate that a combination of thesefeatures cannot be advantageously used.

Reference numerals appearing in the claims are by way of illustrationonly and shall have no limiting effect on the scope of the claims.

In the preceding embodiments, the functions described may be implementedin hardware, software, firmware, or any combination thereof. Ifimplemented in software, the functions may be stored on or transmittedover, as one or more instructions or code, a computer-readable mediumand executed by a hardware-based processing unit.

Computer-readable media may include computer-readable storage media,which corresponds to a tangible medium such as data storage media, orcommunication media including any medium that facilitates transfer of acomputer program from one place to another, e.g., according to acommunication protocol. In this manner, computer-readable mediagenerally may correspond to (1) tangible computer-readable storage mediawhich is non-transitory or (2) a communication medium such as a signalor carrier wave. Data storage media may be any available media that canbe accessed by one or more computers or one or more processors toretrieve instructions, code and/or data structures for implementation ofthe techniques described in this disclosure. A computer program productmay include a computer-readable medium.

By way of example, and not limitation, such computer-readable storagemedia can comprise RAM, ROM, EEPROM, CD-ROM or other optical diskstorage, magnetic disk storage, or other magnetic storage devices, flashmemory, or any other medium that can be used to store desired programcode in the form of instructions or data structures and that can beaccessed by a computer. Also, any connection is properly termed acomputer-readable medium. For example, if instructions are transmittedfrom a website, server, or other remote source using a coaxial cable,fiber optic cable, twisted pair, digital subscriber line (DSL), orwireless technologies such as infrared, radio, and microwave, then thecoaxial cable, fiber optic cable, twisted pair, DSL, or wirelesstechnologies such as infrared, radio, and microwave are included in thedefinition of medium. It should be understood, however, thatcomputer-readable storage media and data storage media do not includeconnections, carrier waves, signals, or other transient media, but areinstead directed to non-transient, tangible storage media. Disk anddisc, as used herein, includes compact disc (CD), laser disc, opticaldisc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wheredisks usually reproduce data magnetically, while discs reproduce dataoptically with lasers. Combinations of the above should also be includedwithin the scope of computer-readable media.

Instructions may be executed by one or more processors, such as one ormore digital signal processors (DSPs), general purpose microprocessors,application specific integrated circuits (ASICs), field programmablelogic arrays (FPGAs), or other equivalent integrated or discrete logiccircuitry. Accordingly, the term “processor,” as used herein may referto any of the foregoing structure or any other structure suitable forimplementation of the techniques described herein. In addition, in someaspects, the functionality described herein may be provided withindedicated hardware and/or software modules configured for encoding anddecoding, or incorporated in a combined codec. Also, the techniquescould be fully implemented in one or more circuits or logic elements.

The invention claimed is:
 1. A method of encoding a motion vectorpredictor index, comprising: generating a list of motion vectorpredictor candidates including a candidate for subblock collocatedtemporal prediction and a candidate for subblock Affine prediction;selecting one of the motion vector predictor candidates in the list; andencoding a motion vector predictor index for the selected motion vectorpredictor candidate using CABAC coding, a first bit of the motion vectorpredictor index being CABAC coded and all bits except for the first bitof the motion vector predictor index being bypass CABAC coded.
 2. Amethod of decoding a motion vector predictor index, comprising:generating a list of motion vector predictor candidates including acandidate for subblock collocated temporal prediction and a candidatefor subblock Affine prediction; decoding the motion vector predictorindex using CABAC decoding, a first bit of the motion vector predictorindex being CABAC decoded and all bits except for the first bit of themotion vector predictor index being bypass CABAC decoded; andidentifying one of the motion vector predictor candidates in the list,using the decoded motion vector predictor index.
 3. An encodingapparatus for encoding a motion vector predictor index, comprising: agenerator which generates a list of motion vector predictor candidatesincluding a candidate for subblock collocated temporal prediction and acandidate for subblock Affine prediction; a selector which selects oneof the motion vector predictor candidates in the list; and an encoderwhich encodes a motion vector predictor index for the selected motionvector predictor candidate using CABAC coding, a first bit of the motionvector predictor index being CABAC coded and all bits except for thefirst bit of the motion vector predictor index being bypass CABAC coded.4. A decoding apparatus for decoding a motion vector predictor index,comprising: a generator which generates a list of motion vectorpredictor candidates including a candidate for subblock collocatedtemporal prediction and a candidate for subblock Affine prediction; adecoder which decodes the motion vector predictor index using CABACdecoding, a first bit of the motion vector predictor index being CABACdecoded and all bits except for the first bit of the motion vectorpredictor index being bypass CABAC decoded; and an identifying unitwhich identifies one of the motion vector predictor candidates in thelist, using the decoded motion vector predictor index to identify one ofthe motion vector predictor candidates in the list.
 5. The method asclaimed in claim 1, wherein the motion vector predictor candidate areMerge candidates and the motion vector predictor index is a Merge index.6. The method as claimed in claim 2, wherein the motion vector predictorcandidates are Merge candidates and the motion vector predictor index isa Merge index.
 7. The encoding apparatus as claimed in claim 3, whereinthe motion vector predictor candidates are Merge candidates and themotion vector predictor index is a Merge index.
 8. The decodingapparatus as claimed in claim 4, wherein the motion vector predictorcandidates are Merge candidates and the motion vector predictor index isa Merge index.
 9. A non-transitory computer-readable storage mediumcarrying a computer program comprising program instructions adapted toperform, when executed in a computing device, a method of encoding amotion vector predictor index, comprising: generating a list of motionvector predictor candidates including a candidate for subblockcollocated temporal prediction and a candidate for subblock Affineprediction; selecting one of the motion vector predictor candidates inthe list; and encoding a motion vector predictor index for the selectedmotion vector predictor candidate using CABAC coding, a first bit of themotion vector predictor index being CABAC coded and all bits except forthe first bit of the motion vector predictor index being bypass CABACcoded.
 10. A non-transitory computer-readable storage medium carrying acomputer program comprising program instructions adapted to perform,when executed in a computing device, a method of decoding a motionvector predictor index, comprising: generating a list of motion vectorpredictor candidates including a candidate for subblock collocatedtemporal prediction and a candidate for subblock Affine prediction;decoding the motion vector predictor index using CABAC decoding, a firstbit of the motion vector predictor index being CABAC coded and all bitsexcept for the first bit of the motion vector predictor index beingbypass CABAC decoded; and identifying one of the motion vector predictorcandidates in the list, using the decoded motion vector predictor index.